001 /* 002 * Copyright 2005 Stephen McConnell 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 013 * implied. 014 * 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019 package net.dpml.transit; 020 021 import java.io.IOException; 022 023 import net.dpml.lang.UnknownKeyException; 024 025 /** 026 * A interface supporting access to pluggable content handlers. 027 * 028 * @author <a href="http://www.dpml.net">Digital Product Meta Library</a> 029 * @version 1.0.2 030 */ 031 public interface LayoutRegistry 032 { 033 /** 034 * Constrant layout plugin key. 035 */ 036 public static final String LAYOUT_HANDLER_PLUGIN_KEY = "dpml.transit.layout.plugin"; 037 038 /** 039 * Return a location resolver capable for supporting the supplied id. If 040 * a handler is available the handler is returned otherwise the returned 041 * value is null. 042 * 043 * @param id the layout identifier 044 * @return the location resolver or null if not available 045 * @exception UnknownKeyException if the key is not recognized 046 * @exception IOException if an IO error occurs 047 */ 048 Layout getLayout( final String id ) throws UnknownKeyException, IOException; 049 }